import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/index.js"
//index.js 是默认导入JS文件  可以简写./router
 import axios from "axios"
 import store from './store'
 


console.log("main.js");
var vm=createApp(App) 
//要把router对象给到Vue对象 原形prototype
vm.use(router)
vm.use(store)  //this.$store.user.name=
               //{{$store.user.name}}

import {$get,$postx,$postj,$postf } from './ajax/index.js'

			   
			   
// vm.config.globalProperties.$axios=axios
vm.config.globalProperties.$get=$get;
vm.config.globalProperties.$postf=$postf;
vm.config.globalProperties.$postj=$postj;
vm.config.globalProperties.$postx=$postx;
vm.config.globalProperties.$showErr=function(msg){
	store.state.erropen=true;
	store.state.errmag=msg;
};

/* axios.baseUrl 替代了 */
// vm.config.globalProperties.$ip="http://127.0.0.1:9000"
vm.mount('#app')
